package com.chhuang.ewcrm.filter;

import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;

public class WebSiteMeshFilter extends ConfigurableSiteMeshFilter {
    @Override
    protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
        //设置模板装饰的请求，参数（拦截的请求（可以采用通配符方式），装饰该请求的装饰模板）
        //index是一个页面模板放在src/main/resource/templates/decorators目录下
        builder.addDecoratorPath("/admin/*", "/decorators/main");
//                .addExcludedPath("/login")
//                .addExcludedPath("/error404")
//                .addExcludedPath("/error500"); //白名单，不进行过滤的请求
    }
}
